/*
**********************************************************************************
    OpenSURF642 : An TI DM642 implementation of OpenSURF.
    Copyright (C) 2011  Hai Yu

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
	This implementation is based on The original OpenSURF library created
	by Christopher Evans.The original work can be found at
		http://www.chrisevansdev.com/computer-vision-opensurf.html
	
    contact: yuhaihai12345@gmail.com	
**********************************************************************************
*/

#ifndef _OPEN_SURF_642
#define _OPEN_SURF_642


#include "IPoint.h"
#include "responselayer.h"
#include "fasthessian.h"
#include "surf.h"

/*
*******************************************************************
*	Detect interest points and generate descriptors		
*	Params:		Uimage8 * image			Original gray image
*				IPoint ** ipts			Output pointer to IPoint array
*				Uint16  * ipts_count	Output parameter, contains the
*										length of IPoint array
*
*				Uint8     upright		0:Non-upright 1:Upright
*				Uint16	  octaves       number of octaves
*				Uint16    intervals     Number of intervals in pixels
*				Uint16    init_samples	Initial sampling rate
*				ResponseDataType thres  Threshold for ignoring hessian
*										  responses
*
*	Note:1.	Normally IPoint array is allocated within the function, and must 
*			be manually released by calling free().
*		2.  If either ipts or ipts_count is NULL then there will be no
*			output at all.Naturally, no need to release anything in
*			this case.
**********************************************************************
*/
void surfDetDes(    Uimage8 * image,
					IPoint ** ipts,
					Uint16  * ipts_count,
	
					Uint8     upright,
					Uint16    octaves,
					Uint16    intervals,
					Uint16    init_sample,
					ResponseDataType thres
					);

/*
*******************************************************************
*	Detect interest points		
*	Params:		Uimage8 * image			Original gray image
*				IPoint ** ipts			Output pointer to IPoint array
*				Uint16  * ipts_count	Output parameter, contains the
*										length of IPoint array
*
*				Uint16	  octaves       number of octaves
*				Uint16    intervals     Number of intervals in pixels
*				Uint16    init_samples	Initial sampling rate
*				ResponseDataType thres  Threshold for ignoring hessian
*										  responses
*
*	Note:1.	Normally IPoint array is allocated within the function, and must 
*			be manually released by calling free().
*		2.  If either ipts or ipts_count is NULL then there will be no
*			output at all.Naturally, no need to release anything in
*			this case.
**********************************************************************
*/
void surfDet(       Uimage8 * image,
					IPoint ** ipts,
					Uint16  * ipts_count,
	
					Uint16    octaves,
					Uint16    intervals,
					Uint16    init_sample,
					ResponseDataType thres
					);

#endif


